xen/arm: Simply the definition of PAGE_SIZE by using the macro _AC
authorJulien Grall <julien.grall@arm.com>
Wed, 22 Jun 2016 13:21:01 +0000 (14:21 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Thu, 14 Jul 2016 11:13:05 +0000 (12:13 +0100)
The macro _AC is used to define constant for both assembly and C.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/asm-arm/config.h

index 9417be6e34ee37791eebac75a9558b518a87b5ea..a96f84546c46e0be7b55ede9c08f085ea7d0d26e 100644 (file)
 #define FIXMAP_ACPI_END    (FIXMAP_ACPI_BEGIN + NUM_FIXMAP_ACPI_PAGES - 1)  /* End mappings of ACPI tables */
 
 #define PAGE_SHIFT              12
-
-#ifndef __ASSEMBLY__
-#define PAGE_SIZE           (1L << PAGE_SHIFT)
-#else
-#define PAGE_SIZE           (1 << PAGE_SHIFT)
-#endif
+#define PAGE_SIZE           (_AC(1,L) << PAGE_SHIFT)
 #define PAGE_MASK           (~(PAGE_SIZE-1))
 #define PAGE_FLAG_MASK      (~0)